#if !defined(AFX_BUSQUEDAVIEW_H__4280B620_A257_40F8_A3DC_B063FDFF0500__INCLUDED_)
#define AFX_BUSQUEDAVIEW_H__4280B620_A257_40F8_A3DC_B063FDFF0500__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BusquedaView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CBusquedaView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "IsisDocSearch.h"
#include "Busqueda.h"
#include "Diccionario.h"
//#include "global.h"



class CBusquedaView : public CFormView
{
protected:
	CBusquedaView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CBusquedaView)

// Form Data
public:
	//{{AFX_DATA(CBusquedaView)
	enum { IDD = IDD_VISTABUSQUEDA };
	CButton	m_BotonAnterior;
	CButton	m_BotonSiguiente;
	CEdit	m_ExpresionBusqueda;
	CComboBox m_HistoricoBusquedas;
	CComboBox m_ComboTags;
	CButton m_Execute;
	CButton m_Clear;
	CButton m_Cancel;
	CStatic m_LabelExpresion;
	CStatic m_LabelHistorico;
	CStatic m_LabelChoice;
	CStatic m_LabelHelp;	
	CStatic m_NumResults;
	CButton m_VerDiccionario;
	CMSFlexGrid m_Grid_Resultados;
	//}}AFX_DATA

// Attributes
public:
   CMyIsisExternal cmi;
   //CMyIsis cmiFDT21;
   CIsismarcView* vista_asociada;
         
// Operations
public:
	int extractNumResults(CString);
	CString extractColumn(CString);
	CString extractMFN(CString);
	CString m_ExpresionSaved;
	int m_LongLista;
	int m_Origen;
	void SetDiccionarioCerrado();
	void AgregaTermDict(CString);
	void CerrarDict();
	BOOLEAN DictAbierto;
	CString Obtener_ExpBusquedaAnt(int);
	long m_RecsLastSearch;
	BOOLEAN primera;
	BOOLEAN OnFileClose();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBusquedaView)
	public:
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
	virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CBusquedaView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CBusquedaView)
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnCancelMode();
	afx_msg void OnOk();
	afx_msg void OnCancel();
	afx_msg void OnDblClickMsflexgrid1();
	afx_msg void OnClear();
	afx_msg void OnButtonAnd();
	afx_msg void OnButtonOr();
	afx_msg void OnButtonNot();
	afx_msg void OnSelchangeListabusquedas();
	afx_msg void OnParentesisAbre();
	afx_msg void OnParentesisCierra();
	afx_msg void OnViewdict();
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnBotonAnterior();
	afx_msg void OnBotonSiguiente();
	afx_msg void Onbotonexpresion();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CString extractResult(CString);
	CDiccionario* MyDict;
	BOOLEAN Es_Separador(char);
	CString Parser_Busquedas(CString);
	CString Elimino_SubCampos(CString);
	void Generar_Grid_Resultados(CString);
	void Agregar_Historico_Busquedas(int,CString, CString);
	void Asignar_Traducciones();
	void Actualizar_Lista_Busquedas();
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BUSQUEDAVIEW_H__4280B620_A257_40F8_A3DC_B063FDFF0500__INCLUDED_)
